﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Xml;
using Enring.Workflow.Models;

namespace Enring.Workflow
{
    public class Engine
    {
        private static Engine _instance;
        /// <summary>
        /// Workflow engine static instance
        /// </summary>
        public static Engine Current
        {
            get
            {
                if (_instance == null)
                {
                    _instance = new Engine();
                }
                return _instance;
            }
        }

        public WorkflowProcess LoadModel(XmlNode xpdl)
        {
            WorkflowProcess wp = new WorkflowProcess(xpdl);
            return wp;
        }
    }
}
